import { request } from '@/plugin/request'

// 热门搜索关键词
export function hotwordsData () {
  return request({
    url: '/home/public/hotwords',
    method: 'get'
  })
}

// 产品搜索页面属性参数
export function getParamsData (kwords) {
  return request({
    url: '/home/goods/param',
    params: { kwords },
    method: 'get'
  })
}

// 产品搜索结果
export function getSearchData (params) {
  if (params.param && params.param === '[]') {
    params.param = ''
  }
  return request({
    url: '/home/goods/search',
    params: params,
    method: 'get'
  })
}

